(function () {
  const ctx = {
    container: null
  };
  window.appA = {
    bootstrap: function () {
      return Promise.resolve().then(() => {
        console.log('bootstrapping');
        ctx.container = document.querySelector('#app')
      });
    },
    mount: function () {
      return Promise.resolve().then(() => {
        console.log('mounting');
        ctx.container.innerHTML = 'hello world. my name is appA';
      })
    },
    unmount: function () {
      return Promise.resolve().then(() => {
        console.log('unmounting')
        ctx.container.innerHTML = '';
      })
    }
  };
})();
